home *** CD-ROM | disk | FTP | other *** search
/ Info-Mac 4 / Info_Mac IV CD-ROM (Pacific HiTech Inc.)(August 1994).iso / Development / General / Script Tools / Examples / Choose New File Example < prev    next >
Text File  |  1993-09-24  |  472b  |  16 lines

  1. set folderOK to true
  2. try
  3.     set newFile to ¬
  4.         choose new file with prompt "Please select an new archive file:" ¬
  5.             default name "Testing"
  6. on error errText number errNum
  7.     display dialog "Choose new file canceled" buttons {"OK"} default button {"OK"}
  8.     set folderOK to false
  9. end try
  10.  
  11. if folderOK then
  12.     display dialog "Selected new file: “" & (folder returned of newFile as string) & (¬
  13.         filename returned of newFile) & "”" ¬
  14.         buttons {"OK"} ¬
  15.         default button {"OK"}
  16. end if